package jmine.tec.security.josso;

import bancosys.tec.exception.LocalizedMessageHolder;
import bancosys.tec.exception.MessageCreator;
import bancosys.tec.exception.MessageCreatorHelper;

/**
 * @author lundberg
 */
public enum SecurityJOSSOMessages implements MessageCreator {
    NO_SUCH_DOMAIN(0, "jmine.tec.security.josso.no.such.domain"),

    UNEXPECTED_SESSION_NOT_FOUND(0, "jmine.tec.security.josso.unexpected.session.not.found"),

    UNEXPECTED_EXCEPTION_AUTHENTICATING(0, "jmine.tec.security.josso.unexpected.exception.authenticating"),

    UNEXPECTED_EXCEPTION_BUILDING_CREDENTIALS(0, "jmine.tec.security.josso.unexpected.exception.building.credentials"),

    WEB_CONFIGURATION_NOT_FOUND(0, "jmine.tec.security.josso.web.configuration.not.found");

    private final MessageCreator delegate;

    /**
     * Construtor
     * 
     * @param nargs nargs
     * @param key key
     */
    private SecurityJOSSOMessages(int nargs, String key) {
        this.delegate = MessageCreatorHelper.creator("security-josso-messages", key, nargs);
    }

    /**
     * {@inheritDoc}
     */
    public LocalizedMessageHolder create(Object... arguments) {
        return this.delegate.create(arguments);
    }

    /**
     * {@inheritDoc}
     */
    public int getExpectedArguments() {
        return this.delegate.getExpectedArguments();
    }
}
